//package lvxu.controller;
//
//import com.github.pagehelper.PageInfo;
//import lvxu.bean.CollectList;
//import lvxu.bean.Msg;
//import lvxu.service.CollectListService;
//import lvxu.service.MusicListService;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.stereotype.Controller;
//import org.springframework.web.bind.annotation.*;
//
//import java.util.ArrayList;
//import java.util.List;
//
//@Controller
//public class CollectListController {
//    @Autowired
//    CollectListService collectListService;
//    @Autowired
//    MusicListService musicListService;
//    @RequestMapping(value = "/collect",method = RequestMethod.GET)
//    @ResponseBody
//    public Msg getCollectInfo(@RequestParam("userid") Integer userid){
//        List<CollectList> collectlistList = collectListService.selectByUserId(userid);
//        //导航页码数
//        PageInfo<CollectList> pageInfo = new PageInfo<>(collectlistList);
//        return Msg.success().add("collect",pageInfo);
//    }
//
//    @RequestMapping(value = "/collect/{del_id}",method = RequestMethod.DELETE)
//    @ResponseBody
//    public Msg deleteCollectInfo(@PathVariable("del_id") Integer del_id){
//        //1、删除收藏列表里的数据，
//        collectListService.deleteById(del_id);
//        musicListService.updateMusicLike(del_id,"del");
//        //2、修改歌曲列表里的该歌曲的收藏状态
//        return Msg.success();
//    }
//}
